﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using ExtraClub.Domain.Framework;

namespace ExtraClub.Domain.Entity {
    public class MenuItem {
        public string Id { get; set; }
        public string Title { get; set; }
        public string Url { get; set; }
        public bool Current { get; set; }
        public List<MenuItem> Items { get; set; }

        public MenuItem() {
        }
        public MenuItem(string id, string title, string url, bool current) {
            Id = id;
            Title = title;
            Url = url;
            Current = current;
        }
    }

    public class Menu {
        public List<MenuItem> Items { get; set; }
        public string CurrentItem { get; set; }

        public static Menu GetCurrentMenu() {
            return SiteManager.BuildMainMenuByUrl(SiteContext.Current.Page.Url);
        }
     }
}
